﻿using System;
using System.Collections.Generic;
using System.Text;
using YouHP.Model;
using YouHP.BLL;
using YouHP.Utility;

namespace YouHP.Pages
{
    public class SearchPatient : BasePage
    {
        protected  List<DiseaseInfo> mDiseaseLst;
        protected  List<SymptomInfo> mSymptomLst;
        protected  List<TreatmentInfo> mTreatmentLst;
        protected List<DistrictInfo> ProvinceList;
      
        protected override void ShowPage()
        {
            base.ShowPage();

            this.SetTitle("病友高级搜索");
            this.AddLocation("病友高级搜索", "/SearchPatient.aspx");

            ProvinceList = DistrictBLL.Instance.GetDistrictListByParent(0);
            mDiseaseLst = DiseaseBLL.Instance.GetAllDiseaseByName("");
            mTreatmentLst = TreatmentBLL.Instance.GetAllTreatmentByName("");
            mSymptomLst = SymptomBLL.Instance.GetAllSymptomByName("");

            PatientSearchCondition cond = new PatientSearchCondition();
            cond.AgeStart = RequestTools.GetQueryInt("agefrom", 0);
            cond.AgeEnd = RequestTools.GetQueryInt("ageto", 0);
            cond.ProvinceId = RequestTools.GetQueryInt("province", 0);
            cond.CityId = RequestTools.GetQueryInt("city", 0);
            cond.TreatmentId = RequestTools.GetQueryInt("trmid", 0);
            cond.TreatmentName = RequestTools.GetQueryString("trmname");
            cond.SymptomName = RequestTools.GetQueryString("symname");
            cond.SymptomId = RequestTools.GetQueryInt("symid", 0);
            cond.DiseaseId = RequestTools.GetQueryInt("dszid", 0);
            cond.DiseaseName = RequestTools.GetQueryString("dszname");
            cond.PatientName = RequestTools.GetQueryString("name");
            cond.IsAdvanceSearch = RequestTools.GetInt("advance", 0);
            cond.Gender = RequestTools.GetQueryString("gender");

        }
    }
}
